package com.itheima.mapper;

import com.itheima.model.TSeckillArticle;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author astupidcoder
 * @since 2021-05-15
 */
public interface TSeckillArticleMapper extends BaseMapper<TSeckillArticle> {
//     for update;
    @Select("select id, articleStockNum from t_seckill_article where articleId = #{articleId} for update;")
    TSeckillArticle selectStockNumByArticleId(@Param("articleId") String articleId);
}
